<HTML><HEAD><TITLE>read_annotated(+Stream, -AnnTerm)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">Term I/O</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>read_annotated(+Stream, -AnnTerm)</H1>
Read term with type and source position information
<DL>
<DT><EM>Stream</EM></DT>
<DD>Integer (stream number) or Atom (reserved or user-defined symbolic stream name).
</DD>
<DT><EM>AnnTerm</EM></DT>
<DD>Variable or term
</DD>
</DL>
<H2>Description</H2>
<P>    This is defined as
<PRE>
    read_annoated(Stream, AnnTerm) :-
    	read_annotated(Stream _Term, AnnTerm).
</PRE>
	</P>
<H3>Modes and Determinism</H3><UL>
<LI>read_annotated(+, -) is semidet
</UL>
<H3>Modules</H3>
This predicate is sensitive to its module context (tool predicate, see @/2).
<H3>Fail Conditions</H3>
Fails if a syntax error was detected and no term could be read
<H3>Exceptions</H3>
<DL>
<DT><EM>(4) instantiation fault </EM>
<DD>Stream is not instantiated.
<DT><EM>(5) type error </EM>
<DD>Stream is not an atom or an integer.
<DT><EM>(190) end of file reached </EM>
<DD>End of file was encountered before reading any character.
<DT><EM>(192) illegal stream mode </EM>
<DD>Stream is not an input stream.
<DT><EM>(193) illegal stream specification </EM>
<DD>Stream is an illegal stream specification.
<DT><EM>(198) reading past the file end </EM>
<DD>Trying to read even after the error 190 was raised.
</DL>
<H2>See Also</H2>
<A HREF="../../kernel/ioterm/read_annotated-3.html">read_annotated / 3</A>
</BODY></HTML>
